<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/include/taglibs.jsp"%>
<link type="text/css" rel="stylesheet" href="./styles/hx.base.css">
<link type="text/css" rel="stylesheet" href="./styles/hx.menu.css">
<link type="text/css" rel="stylesheet" href="./styles/hx.list.css">
<link type="text/css" rel="stylesheet" href="./styles/hx.content.css" />
<link type="text/css" rel="stylesheet" href="./styles/calendar-themes.css" />
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/scripts/colorbox/colorbox.css" />

<link href="./styles/uniform/default.uni-form.css" media="screen"
	rel="stylesheet" />
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/hx.list.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/colorbox/jquery.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/colorbox/jquery.colorbox.js"></script>
<style>
body {
	margin:0px; padding:0px;
	background-color: #EFEEEF;
}
</style>
<script language="javascript">
<!--
function senfe(o,a,b,c,d){
var t=document.getElementById(o).getElementsByTagName("tr");
for(var i=0;i<t.length;i++){
t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b;
t[i].onclick=function(){
if(this.x!="1"){
this.x="1";//本来打算直接用背景色判断，FF获取到的背景是RGB值，不好判断
this.style.backgroundColor=d;
}else{
this.x="0";
this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
}
}
$(t[i]).mouseover(function(){
if(this.x!="1")this.style.backgroundColor=c;
});
$(t[i]).mouseout(function(){
if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
});
}
}
$(document).ready(function (){
	//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
	senfe("t_robotmanage","#e5f1f4","#f8fbfc","#ecfbd4","#bce774");
});
--></script>

<script type="text/javascript">

function showLostRate(){  
	var myID = "-1";
	$("input[name='id']").each(function(){
		if($(this).attr("checked")){
			myID=myID+"_"+$(this).attr("value");
		} 
	});
	var url_str = "<%=request.getContextPath()%>/pages/ne/iptv_lost_rate_show.jsp?id="+myID;
	frmList.action = url_str;		
	frmList.submit();		
}

function showQuality(){  
	var myID = "-1";
	$("input[name='id']").each(function(){
		if($(this).attr("checked")){
			myID=myID+"_"+$(this).attr("value");
		} 
	});
	var url_str = "<%=request.getContextPath()%>/pages/ne/iptv_quality_show.jsp?id="+myID;
	frmList.action = url_str;		
	frmList.submit();		
}
function search(){			
   frmList.submit();	
}
</script>
<script >
	$(document).ready(function(){
				$(".setting").colorbox({width:"90%", height:"60%", iframe:true});
				//Example of preserving a JavaScript event for inline calls.
				$("#click").click(function(){ 
					$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
					return false;
				});
			});
</script>

<div>
<div style="text-align: left; color: red"><html:errors /></div>

<form id="frmList" action="common.indextreerobotmanage.do" method="post">
<input type="hidden" value="${param.id}" id="id" name="id"/>
<table width="100%" border="0" cellpadding="3" cellspacing="0"
	class="sanxuan" style="background-repeat: repeat;">
	<tbody>
		<tr>
			<td height="31" width="900px"
				style="font-size: 14px; color: white; text-align: center">&nbsp;设备查询</td>
		</tr>
		<tr>
			<td>
			<table border="0" width="95%" align="center">
				<tr align="left">
					<td> 
					<strong>设备名称:</strong>  
					<input type="text" name="name" id="name" value="${param.name }"/>
					</td>

					<td align="left"><img
						src="<%=request.getContextPath() %>/images/table/chaxun.gif"
						width="90" height="30" style="cursor: hand;"
						onclick="javascript:search();" /></td>
				</tr>
			</table>
			</td>
		</tr>
	</tbody>
</table>
<div class="guanli" style="float: right;"><br />
	<input type="button" name="lostRate" class="button" value="丢包概率"
		onclick="javascript:showLostRate();" />
	<input type="button" name="quality" class="button" value="服务可用性"
		onclick="javascript:showQuality();" />
</div>
<table width="100%" cellpadding="4" class="liebiao" id="t_robotmanage"
	align="center">
	<thead>
		<tr>
			<td width="23" align="center">
				<input id="all" name="all" type="checkbox"
					onclick="list_select_all();" />
			</td>
			<td>设备名称</td>
			<td>所属区局</td>
			<td>操作</td>
		</tr>
	</thead>
	<tbody>
		<c:forEach var='robotmanage' items="${RA_PAGER_ITEMS}" varStatus="vs">
			<tr>
				<td class="list-value"><input id="id" name="id" type="checkbox"
					value="${robotmanage[0]}" onClick="list_check_selection()"></td>
				<td class="list-value">
				${robotmanage[1] }
				</td>
				<td class="list-value">
				${robotmanage[2] }
				</td>
				<td class="list-value" style="width: 250px;">
				<a class="setting" href="pages/ne/iptv_lost_rate_show.jsp?id=${robotmanage[0]}">丢包概率 </a> 
				<a class="setting"
					href="pages/ne/iptv_quality_show.jsp?id=${robotmanage[0]}">服务可用性</a>
				</td>
			</tr>
		</c:forEach>
	</tbody>
	<tfoot>
	</tfoot>
</table>
<br />
<div class="pagenav"><jsp:include page="/include/pager.jsp"
	flush="true" /></div>
</form>
</div>
